package com.guigu.vo;

import java.util.ArrayList;
import java.util.List;

/*
生成编码
 */
public class CodeGenerator {
    private List<String> existingCodes;
    private String prefix;

    public CodeGenerator(String prefix) {
        this.prefix = prefix;
        this.existingCodes = new ArrayList<>();
    }

    public String generateCode(int id) {
        String numberPart = String.format("%04d", id);
        return prefix + numberPart;
    }
}
